home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / text / faqs / perl-faq.part1 < prev    next >
Encoding:
Internet Message Format  |  1993-10-03  |  36.0 KB

  1. Subject: Perl Frequently Asked Questions, part 1 of 4
  2. Newsgroups: comp.lang.perl,news.answers
  3. From: Tom Christiansen <tchrist@cs.Colorado.EDU>
  4. Date: Sat, 2 Oct 1993 06:37:04 GMT
  5.  
  6. Archive-name: perl-faq/part1
  7. Version: $Id: perl-info1,v 1.1 93/10/02 00:27:05 tchrist Exp Locker: tchrist $
  8.  
  9. This posting contains answers to general information questions,
  10. mostly of a non-technical nature.  The following questions are 
  11. answered in this posting:
  12.  
  13. 1.1) What is Perl?
  14. 1.2) Is Perl hard to learn?
  15. 1.3) Should I program everything in Perl?
  16. 1.4) Where can I get Perl over the Internet?
  17. 1.5) Where can I get Perl via Email?
  18. 1.6) How can I get Perl via UUCP?
  19. 1.7) Where can I get more information on Perl?
  20. 1.8) Can people who aren't on USENET receive comp.lang.perl as a digest?
  21. 1.9) Are archives of comp.lang.perl available?
  22. 1.10) Is there a WAIS server for Perl?
  23. 1.11) Is there a Perl port to machine FOO?
  24. 1.12) How do I get Perl to compile on Solaris?
  25. 1.13) How do I get Perl to compile on a Next?
  26. 1.14) Where can I get (info|inter|ora|sql|syb)perl?
  27. 1.15) Where can I get an SNMP-aware Perl?
  28. 1.16) There's an a2p and an s2p; why isn't there a p2c (perl-to-C)?
  29. 1.17) Where can I get undump for my machine?
  30. 1.18) Where can I get a perl-mode for emacs?
  31. 1.19) How can I use Perl interactively?
  32. 1.20) Is there a Perl shell? 
  33.  
  34.  
  35. 1.1) What is Perl?
  36.  
  37.     A programming language, by Larry Wall <lwall@netlabs.com>.
  38.  
  39.     Here's the beginning of the description from the man page:
  40.  
  41.     Perl is an interpreted language optimized for scanning arbitrary text
  42.     files, extracting information from those text files, and printing reports
  43.     based on that information.  It's also a good language for many system
  44.     management tasks.  The language is intended to be practical (easy to use,
  45.     efficient, complete) rather than beautiful (tiny, elegant, minimal).  It
  46.     combines (in the author's opinion, anyway) some of the best features of C,
  47.     sed, awk, and sh, so people familiar with those languages should have
  48.     little difficulty with it.  (Language historians will also note some
  49.     vestiges of csh, Pascal, and even BASIC-PLUS.)  Expression syntax
  50.     corresponds quite closely to C expression syntax.  Unlike most Unix
  51.     utilities, Perl does not arbitrarily limit the size of your data--if
  52.     you've got the memory, Perl can slurp in your whole file as a single
  53.     string.  Recursion is of unlimited depth.  And the hash tables used by
  54.     associative arrays grow as necessary to prevent degraded performance.
  55.     Perl uses sophisticated pattern matching techniques to scan large amounts
  56.     of data very quickly.  Although optimized for scanning text, Perl can also
  57.     deal with binary data, and can make dbm files look like associative arrays
  58.     (where dbm is available).  Setuid Perl scripts are safer than C programs
  59.     through a dataflow tracing mechanism which prevents many stupid security
  60.     holes.  If you have a problem that would ordinarily use sed or awk or sh,
  61.     but it exceeds their capabilities or must run a little faster, and you
  62.     don't want to write the silly thing in C, then Perl may be for you.  There
  63.     are also translators to turn your sed and awk scripts into Perl scripts.
  64.  
  65.  
  66. 1.2) Is Perl hard to learn?
  67.     
  68.     No, Perl is easy to learn for two reasons.  
  69.    
  70.     The first reason is that most of Perl is derived from existing tools
  71.     and languages, ones that many people who turn to Perl already have
  72.     some familiarity with.  These include the C programming language, the
  73.     UNIX C library, the UNIX shell, sed, and awk.  If you already know
  74.     these somewhat, Perl should be very easy for you.
  75.  
  76.     The second reason that Perl is easy to learn is that you don't have to
  77.     know every thing there is to know about it in order to get good use
  78.     out of it.  In fact, just a very small subset, mostly borrowed from C,
  79.     the shell, and sed, will be enough for most tasks.  As you feel the
  80.     need or desire to use more sophisticated features (such as C
  81.     structures or networking), you can learn these as you go.  The
  82.     learning curve for Perl is not a steep one, especially if you have
  83.     the headstart of having a background in UNIX.  Rather, its learning
  84.     curve is gentle and gradual, but it *is* admittedly rather long.
  85.  
  86.     If you don't know C or UNIX at all, it'll be a steeper learning curve,
  87.     but what you then learn from Perl will carry over into other areas,
  88.     like using the C library, UNIX system call, regular expressions, and
  89.     associative arrays, just to name a few.  To know Perl is to know 
  90.     UNIX, and vice versa.
  91.  
  92.  
  93. 1.3) Should I program everything in Perl?
  94.  
  95.     Of course not.  You should choose the appropriate tool for the task at
  96.     hand.  While it's true that the answer to the question "Can I do (some
  97.     arbitrary task) in Perl?" is almost always "yes", that doesn't mean
  98.     this is necessarily a good thing to do.  For many people, Perl serves
  99.     as a great replacement for shell programming.  For a few people, it
  100.     also serves as a replacement for most of what they'd do in C.  But
  101.     for some things, Perl just isn't the optimal choice, such as tasks
  102.     requiring very complex data structures.
  103.  
  104.  
  105. 1.4) Where can I get Perl over the Internet?
  106.  
  107.     From any comp.sources.misc archive.   Initial sources  were posted to
  108.     Volume 18, Issues 19-54 at patchlevel 3.  The Patches 4-10 were posted
  109.     to Volume 20, Issues 56-62.  You can use the archie server
  110.     (see the alt.sources FAQ in news.answers) for ways to find these.
  111.  
  112.     These machines, at the very least, definitely have it available for
  113.     anonymous FTP:
  114.  
  115.     ftp.uu.net                137.39.1.2
  116.     ftp.netlabs.com         192.94.48.152
  117.     coombs.anu.edu.au        150.203.76.2
  118.     archive.cis.ohio-state.edu      128.146.8.52
  119.     jpl-devvax.jpl.nasa.gov         128.149.1.143
  120.     prep.ai.mit.edu            18.71.0.38
  121.     ftp.cs.ruu.nl            131.211.80.17  (Europe)
  122.  
  123.     Larry's machine is the netlabs one, and the biggest Perl archive
  124.     is on coombs.
  125.  
  126.  
  127. 1.5) Where can I get Perl via Email?
  128.  
  129.     If you are in Europe, you might using the following site.  (I'm still
  130.     looking for a domestic site.) This information thanks to "Henk P.
  131.     Penning" <henkp@cs.ruu.nl>:  One automated fashion is as follows:
  132.  
  133.     Email: Send a message to 'mail-server@cs.ruu.nl' containing:
  134.      begin
  135.      path your_email_address
  136.      send help
  137.      send PERL/INDEX
  138.      end
  139.     The path-line may be omitted if your message contains a normal From:-line.
  140.     You will receive a help-file and an index of the directory that contains
  141.     the Perl stuff.
  142.  
  143.     If all else fails, mail to Larry usually suffices.
  144.  
  145.  
  146. 1.6) How can I get Perl via UUCP?
  147.  
  148.     You can get it from the site osu-cis; here is the appropriate info,
  149.     thanks to J Greely <jgreely@cis.ohio-state.edu> or <osu-cis!jgreely>.
  150.  
  151.     E-mail contact:
  152.         osu-cis!uucp
  153.     Get these two files first:
  154.         osu-cis!~/GNU.how-to-get.
  155.         osu-cis!~/ls-lR.Z
  156.     Current Perl distribution:
  157.         osu-cis!~/perl/4.0/kits@10/perl.kitXX.Z (XX=01-37)
  158.     How to reach osu-cis via uucp(L.sys/Systems file lines):
  159.     #
  160.     # Direct Trailblazer
  161.     #
  162.     osu-cis Any ACU 19200 1-614-292-5112 in:--in:--in: Uanon
  163.     #
  164.     # Direct V.32 (MNP 4)
  165.     # dead, dead, dead...sigh.
  166.     #
  167.     #osu-cis Any ACU 9600 1-614-292-1153 in:--in:--in: Uanon
  168.     #
  169.     # Micom port selector, at 1200, 2400, or 9600 bps.
  170.     # Replace ##'s below with 12, 24, or 96 (both speed and phone number).
  171.     #
  172.     osu-cis Any ACU ##00 1-614-292-31## "" \r\c Name? osu-cis nected \c GO \d\r\d\r\d\r in:--in:--in:
  173.      Uanon
  174.  
  175.     Modify as appropriate for your site, of course, to deal with your
  176.     local telephone system.  There are no limitations concerning the hours
  177.     of the day you may call.
  178.  
  179.     Another possibility is to use UUNET, although they charge you
  180.     for it.  You have been duly warned.  Here's the advert:
  181.  
  182.            Anonymous Access to UUNET's Source Archives
  183.  
  184.                  1-900-GOT-SRCS
  185.  
  186.      UUNET now provides access to its extensive collection of UNIX
  187.     related sources to non- subscribers.  By  calling  1-900-468-7727
  188.     and  using the login "uucp" with no password, anyone may uucp any
  189.     of UUNET's on line source collection.  Callers will be charged 40
  190.     cents  per  minute.   The charges will appear on their next tele-
  191.     phone bill.
  192.  
  193.      The  file  uunet!/info/help  contains  instructions.   The  file
  194.     uunet!/index//ls-lR.Z contains a complete list of the files available
  195.     and is updated daily.  Files ending in Z need to be uncompressed
  196.     before being used.   The file uunet!~/compress.tar is a tar
  197.     archive containing the C sources for the uncompress program.
  198.  
  199.      This service provides a  cost  effective  way  of  obtaining
  200.     current  releases  of sources without having to maintain accounts
  201.     with UUNET or some other service.  All modems  connected  to  the
  202.     900  number  are  Telebit T2500 modems.  These modems support all
  203.     standard modem speeds including PEP, V.32 (9600), V.22bis (2400),
  204.     Bell  212a  (1200), and Bell 103 (300).  Using PEP or V.32, a 1.5
  205.     megabyte file such as the GNU C compiler would cost $10  in  con-
  206.     nect  charges.   The  entire  55  megabyte X Window system V11 R4
  207.     would cost only $370 in connect time.  These costs are less  than
  208.     the  official  tape  distribution fees and they are available now
  209.     via modem.
  210.  
  211.               UUNET Communications Services
  212.            3110 Fairview Park Drive, Suite 570
  213.              Falls Church, VA 22042
  214.              +1 703 876 5050 (voice)
  215.               +1 703 876 5059 (fax)
  216.                 info@uunet.uu.net
  217.  
  218.  
  219.  
  220. 1.7) Where can I get more information on Perl?
  221.  
  222.     We'll cover five areas here: USENET (where you're probably reading
  223.     this), publications, the reference guide, examples on the Internet,
  224.     and Perl instructional courses.
  225.  
  226.     A.  USENET
  227.  
  228.     You should definitely read the USENET comp.lang.perl newsgroup or
  229.     mailing list for all sorts of discussions regarding the language,
  230.     bugs, features, history, humor, and trivia.  In this respect, it
  231.     functions both as a comp.lang.* style newsgroup and also as a user
  232.     group for the language; in fact, there's a mailing list called
  233.     ``perl-users'' that is bidirectionally gatewayed to the newsgroup; see
  234.     question #38 for details.  Larry Wall is a very frequent poster here,
  235.     as well as many (if not most) of the other seasoned Perl programmers.
  236.     It's the best place for the very latest information on Perl.
  237.  
  238.     B.  PUBLICATIONS
  239.  
  240.     If you've been dismayed by the ~80-page troffed Perl man page (or is
  241.     that man treatise?) you should look to ``the Camel Book'', written by
  242.     Larry and Randal Schwartz <merlyn@ora.com>, published as a Nutshell
  243.     Handbook by O'Reilly & Associates and entitled _Programming Perl_.
  244.     Besides serving as a reference guide for Perl, it also contains
  245.     tutorial material and is a great source of examples and cookbook
  246.     procedures, as well as wit and wisdom, tricks and traps, pranks and
  247.     pitfalls.  The code examples contained therein are available via
  248.     anonymous FTP from ftp.uu.net in
  249.     /published/oreilly/nutshell/perl/perl.tar.Z for your retrieval.
  250.     Corrections and additions to the book can be found in the Perl man
  251.     page right before the BUGS section under the heading ERRATA AND
  252.     ADDENDA.  
  253.  
  254.     If you can't find the book in your local technical bookstore, the book
  255.     may be ordered directly from O'Reilly by calling 1-800-998-9938 if in
  256.     North America and 1-707-829-0515.  The book's ISBN is 0-937175-64-1.
  257.    
  258.     Autographed copies are *NO LONGER* available from TECHbooks --
  259.     you'll have to nab the authors in person if you want one.  Larry
  260.     routinely carries around a camel stamp for just such an occasion.
  261.  
  262.     Reasonably substantiated rumor has it that there will be another Perl
  263.     book out pretty soon, this one aimed more at beginners.  Look for it
  264.     from ORA towards the beginning of 93.
  265.    
  266.     Another ORA book by Randal Schwartz is scheduled for imminent
  267.     release.  It is entitled _Learning Perl_ (``The LLama Book'') and
  268.     covers the basics of Perl in a tutorial fashion.
  269.  
  270.     Larry Wall has published a 3-part article on perl in Unix World
  271.     (August through October of 1991), and Rob Kolstad also had a 3-parter
  272.     in Unix Review (May through July of 1990).  Tom Christiansen also has
  273.     a brief overview article in the trade newsletter Unix Technology
  274.     Advisor from November of 1989.  You might also investigate "The Wisdom
  275.     of Perl" by Gordon Galligher from SunExpert magazine;  April 1991
  276.     Volume 2 Number 4.  The Dec 92 Computer Language magazine also
  277.     contains a cover article on Perl, "Perl: the Programmers Toolbox".
  278.  
  279.     Many other articles on Perl have been recently published.  If you 
  280.     have references, especially on-line copies, please mail them to 
  281.     the FAQ maintainer for inclusion is this notice.
  282.  
  283.     The USENIX LISA (Large Installations Systems Administration) Conference
  284.     have for several years now included many papers of tools written in
  285.     Perl.  Old proceedings of these conferences are available; look in
  286.     your current issue of ";login:" or send mail to office@usenix.org 
  287.     for further information.
  288.  
  289.     C.  INTERNET
  290.  
  291.     For other examples of Perl scripts, look in the Perl source directory in
  292.     the eg subdirectory.  
  293.  
  294.     The site with the biggest repository of Perl scripts right now
  295.     seems to be coombs.anu.edu.au [150.203.76.2].  That directory
  296.     has an INDEX with over 300 lines in it, each describing what
  297.     the script does.  This is maintained by mark@coombs.anu.edu.au .
  298.  
  299.     Note:  European users please use the mirror site on
  300.     src.doc.ic.ac.uk[149.169.2.1 in
  301.         /pub/computing/programming/languages/perl/coombs-scripts
  302.     The link speed would be a lot better for all.  Contact
  303.     L.McLoughlin@doc.ic.ac.uk for more information. It is updated daily.
  304.  
  305.     Another source for examples, currently only for anonymous FTP, is on
  306.     convex.com [130.168.1.1].  This contains, amongst other things,
  307.     a copy of the newsgroup up through Aug 91, a text retrieval database
  308.     for the newsgroup, a rather old and short troff version of Tom Christiansen's
  309.     perl tutorial (this was the version presented at Washington DC USENIX),
  310.     and quite a few of Tom's scripts.  You can look at the INDEX file
  311.     in /pub/perl/INDEX for a list of what's in that directory.   
  312.  
  313.     The Convex and Ohio State archives are mirrored on uunet
  314.     in /languages/perl/scripts-{convex,osu}.
  315.  
  316.     There's also a #Perl channel on IRC (Internet Relay Chat) where
  317.     Tom and Randal have been known to hang out.  That's real-time,
  318.     free Perl support.  What more can you ask? :-)
  319.  
  320.     D.  REFERENCE GUIDE
  321.  
  322.     A nice reference guide by Johan Vromans <jv@mh.nl> is also available;
  323.     It is distributed in LaTeX (source) and PostScript (ready to
  324.     print) forms. Obsolete versions may still be available in TeX and troff
  325.     forms, although these don't print as nicely. The official kit
  326.     includes both LaTeX and PostScript forms, and can be FTP'd from
  327.     ftp.cs.ruu.nl [131.211.80.17], file /pub/DOC/perlref-4.035.tar.Z.
  328.     The reference guide comes with the O'Reilly book in a nice, glossy
  329.     card format.
  330.  
  331.     E.  PERL COURSES
  332.  
  333.     Various technical conferences, including USENIX, LISA, SUG, WCSAS, AUUG,
  334.     FedUnix, and Europen have been sponsoring tutorials of varying lengths
  335.     on Perl at their system administration and general conferences.  You
  336.     might consider attending one of these.  These public classes are
  337.     typically taught by Tom Christiansen <tchrist@usenix.com>.  Both Tom
  338.     and Randal Schwartz <merlyn@ora.com> also teach Perl at customer
  339.     sites.  Classes can run from one day up to a week ranging over a wide
  340.     range of subject matter (most are two or three days), and can include
  341.     lab time if you want; having lab time with exercises is generally of
  342.     great benefit.  Send us mail if your organization is interested in
  343.     having a Perl class taught at your site, or if you'd like to know when
  344.     the next public appearances are.
  345.  
  346.  
  347. 1.8) Can people who aren't on USENET receive comp.lang.perl as a digest?
  348.  
  349.     "Perl-Users" is the mailing list version of the comp.lang.perl
  350.     newsgroup.  If you're not lucky enough to be on USENET you can post to
  351.     comp.lang.perl by sending to one of the following addresses.  Which one
  352.     will work best for you depends on which nets your site is hooked into.
  353.     Ask your local network guru if you're not certain.
  354.  
  355.     Internet: PERL-USERS@VIRGINIA.EDU
  356.               Perl-Users@UVAARPA.VIRGINIA.EDU
  357.  
  358.     BitNet: Perl@Virginia
  359.  
  360.     uucp: ...!uunet!virginia!perl-users
  361.  
  362.     The Perl-Users list is bidirectionally gatewayed with the USENET
  363.     newsgroup comp.lang.perl.  This means that VIRGINIA functions as a
  364.     reflector.  All traffic coming in from the non-USENET side is
  365.     immediately posted to the newsgroup.  Postings from the USENET side are
  366.     periodically digested and mailed out to the Perl-Users mailing list.  A
  367.     digest is created and distributed at least once per day, more often if
  368.     traffic warrants.
  369.  
  370.     All requests to be added to or deleted from this list, problems,
  371.     questions, etc., should be sent to:
  372.  
  373.     Internet: Perl-Users-Request@Virginia.EDU
  374.               Perl-Users-Request@uvaarpa.Virginia.EDU
  375.  
  376.     BitNet: Perl-Req@Virginia
  377.  
  378.     uucp: ...!uunet!virginia!perl-users-request
  379.  
  380.     Coordinator: Marc Rouleau <mer6g@VIRGINIA.EDU>
  381.  
  382. 1.9) Are archives of comp.lang.perl available?
  383.  
  384.     Yes, although they're poorly organized.  You can get them from the
  385.     host ftp.ugcs.caltech.edu (131.215.128.204) to the file
  386.     /pub/comp.lang.perl.tar.Z; this file was last modified on February 15,
  387.     1992, and is 8.9 megabytes long.  Obviously, it's considerably out of
  388.     date.
  389.  
  390.     These are currently stored in news- or MH-style format; there are
  391.     subdirectories named things like "arrays", "programs", "taint", and
  392.     "emacs".  Unfortunately, only the first ~1600 or so messages have been
  393.     so categorized, and we're now up to almost 15000.  Furthermore, even
  394.     this categorization was haphazardly done and contains errors.  
  395.  
  396.     Both Larry and I have maintained archives of the nearly 19,000
  397.     messages the newsgroup has seen since its inception.  I'm currently
  398.     looking for a home for them.  It'll take about 100 megabytes, although
  399.     I'm on a 16k/2k filesystem, and that might be reduced somewhat by one
  400.     with smaller frags.  Or perhaps I'll just get myself a new disk.
  401.  
  402.     They're just stored as regular files the way news does, so it's
  403.     somewhat unmanageable.
  404.  
  405.     A more sophisticated query and retrieval mechanism is desirable.
  406.     Preferably one that allows you to retrieve article using a fast-access
  407.     indices, keyed on at least author, date, subject, thread (as in "trn")
  408.     and probably keywords.  Right now, the MH pick command works for this,
  409.     but it is very slow to select on 18000 articles.
  410.  
  411.     If you're serious about this, your best bet is probably to retrieve
  412.     the compressed tarchive and play with what you get.  Any suggestions
  413.     how to better sort this all out are extremely welcome.
  414.  
  415.     If you have a special request for a query on the old newsgroup
  416.     postings, and make nice noises in my direction, I can run the query
  417.     and send them to you.  Algebraic queries are like "find me anything
  418.     about this and that and the other thing but not this or whozits".  I
  419.     hope to put this in the form of a mailserver.  Donated software would
  420.     be fine. :-)
  421.  
  422.     The fast text-retrieval query system for this I'm currently using is
  423.     Liam Quin's excellent lqtext system, available from ftp.cs.toronto.edu
  424.     in /pub/lq-text* .
  425.  
  426.  
  427. 1.10) Is there a WAIS server for Perl?
  428.  
  429.     Rumor has it that there are WAIS servers out there for comp.lang.perl
  430.     these days, but I haven't used them.  Kevin Gardner <gardner@zinc.csb.yale.edu> 
  431.     offers the following: For WAIS server info, check on the gopher hole
  432.     at mudhoney.micro.umn.edu, port 70.  They've got a rather extensive
  433.     list of WAIS servers at this gopher->WAIS gateway, including a c.l.p.
  434.     archive server.  I don't know how up to date the server actually is,
  435.     as the articles I pulled up from there were all dated from '91.
  436.  
  437.     Bill Middleton <wjm@feenix.metronet.com> offers this:
  438.  
  439.     "I have setup a perl script retrieval service and WaisSearch here at
  440.     feenix.  To check it out, just point your gopher at us, and select the
  441.     appropriate menu option.  The WaisSearch is of the iubio type, which
  442.     means you can do boolean searching.  Thus you might try something
  443.     like:
  444.  
  445.     caller
  446.     ioctl and fcntl
  447.     grep and socket not curses
  448.  
  449.     and other things to see examples of how other folks have done this
  450.     or that.  This service is still under construction, but I'd like to
  451.     get feedback, if you have some time.
  452.  
  453.     There's also a WaisSearch into all the RFC's and some other fairly
  454.     nifty stuff."
  455.  
  456.  
  457. 1.11) Is there a Perl port to machine FOO?
  458.  
  459.     Probably.  Perl already runs on virtually all UNIX machines as well as 
  460.     quite a few non-UNIX ones.  Chances are that if you're running a UNIX
  461.     box, you simply need to run Configure and everything will be taken
  462.     care of for you.   For most UNIX machines, no porting is required.
  463.  
  464.     Perl comes with an elaborate auto-configuration script that allows Perl
  465.     to be painlessly ported to a wide variety of platforms, including many
  466.     non-UNIX ones.  Amiga and MS-DOS binaries are available on
  467.     jpl-devvax.jpl.nasa.gov [128.149.1.143] for anonymous FTP.  Try to bring
  468.     Perl up on your machine, and if you have problems, examine the README
  469.     file carefully, and if all else fails, post to comp.lang.perl with 
  470.     a cross-posting to comp.sys.whatever; probably someone out there has
  471.     run into your problem and will be able to help you.  
  472.  
  473.     In the perl archive on coombs.anu.edu.au, you can consult the file
  474.     /pub/perl/misc/perl.code.sources for information not contained below.
  475.     It may also be more up-to-date as well.
  476.  
  477.     In particular, since they're so often asked about, here's some information 
  478.     for the MacIntosh from Matthias Ulrich Neeracher <neeri@iis.ethz.ch>:
  479.  
  480.         The most recent version of Perl for the Apple Macintosh using the
  481.         MPW C compiler is available in:
  482.  
  483.             nic.switch.ch [130.59.1.40]    software/mac/src/mpw_c
  484.             ftp.eunet.ch  [146.228.10.15]  software/mac/perl
  485.  
  486.         The current version is 4.0.7 (despite the "7", it corresponds to
  487.         patchlevel 36 in the Unix version) and is available in the above
  488.         directories as
  489.  
  490.            Mac_Perl_407_src.sit.bin       Sources
  491.            Mac_Perl_407_tool.sit.bin      MPW Tool
  492.            Mac_Perl_407_appl.sit.bin      Standalone Application (See below)
  493.  
  494.         There is a mailing list for discussing Macintosh Perl which can be
  495.         reached at mpw-perl-request@iis.ee.ethz.ch
  496.  
  497.     Here's more, from Timothy Murphy <tim@maths.tcd.ie >
  498.  
  499.     I ported perl to the Mac, using Think C, a while ago.  I've
  500.     used it quite a lot since without problems.
  501.  
  502.     It is available from ftp.maths.tcd.ie in pub/Mac/perl.hqx .
  503.     The source (as diffs from the standard source) is in the
  504.     subdirectory pub/Mac/perl-4.035 .
  505.  
  506.     A Mac version of patch is also available in pub/Mac/patch.hqx
  507.     with source in pub/Mac/patch-2.0 .  Various other Mac ports of
  508.     GNU programs can be found in the same place.
  509.  
  510.     They all use a small "ThinkCPosix" library containing various
  511.     Unix-like functions, which again can be found in the same
  512.     place.
  513.  
  514.     And here's some VMS information from Rao V. Akella 
  515.     <rao@moose.cccs.umn.edu>:  (this appears to be an old port)
  516.  
  517.     You can pick up Perl for VMS (version 3.0.1.1 patchlevel 4) via
  518.     anonymous ftp from ftp.pitt.edu [130.49.253.1] in the
  519.     software/vms/perl subdirectory (there are two files there:
  520.     perl-pl18.bck and perl-pl4.bck).
  521.  
  522.     There is also a v3.018 on info.rz.uni-ulm.de [134.60.1.125] or
  523.     vms.huji.ac.il [128.139.4.3] in /pub/VMS/misc (information courtesy 
  524.     of Anders Rolff <rolff@scotty.eurokom.ie>).
  525.  
  526.     And here is a recent version for MS-DOS from Budi Rahardjo
  527.     <rahard@ee.UManitoba.CA>, who says:
  528.  
  529.     I am collecting MS-DOS Perl(s) in ftp.ee.umanitoba.ca directory
  530.     /pub/msdos/perl.  Currently I received three versions of Perl v4.019
  531.     and one of 4.010.  (Tommy Thorn <tthorn@daimi.aau.dk> and Len Reed
  532.     <holos0!lbr@gatech.edu>)  
  533.  
  534.     There is now a 4.035 for 386 [DOS], Hitoshi Doi <doi@jrd.december.com>
  535.     port, is available ftp.ee.umanitoba.ca as /pub/msdos/perl/perl386.zoo .
  536.  
  537.     Please contact the porters directly in case of questions about
  538.     these ports.
  539.  
  540.  
  541.     A new version of "bigperl4" has been uploaded to Simtel20 and mirror
  542.     sites:
  543.  
  544.         pd1:<msdos.perl>
  545.         BPERL2X.ZIP        32-bit Perl 4.0pl36 w/VM & Win 3.1 supt. (exe)
  546.         BPERL2S1.ZIP       32-bit Perl 4.0pl36 w/VM & Win supt. (src 1/2)
  547.         BPERL2S2.ZIP       32-bit Perl 4.0pl36 w/VM & Win supt. (src 2/2)
  548.  
  549.      For those of you who don't know what "bigperl4" is, here's the
  550.     short description:
  551.  
  552.     BIGPERL4 is Perl 4.0pl36 that has been compiled using the Watcom C/386
  553.     compiler (a 32-bit, flat-memory model C compiler), which gives this
  554.     version the following features:
  555.  
  556.       * Up to 32MB of memory can be used.
  557.       * Supports virtual memory.
  558.       * Works under Windows 3.1 (however, a second copy of perl cannot
  559.         be spawned under Windows).
  560.       * The perl debugger can be used.
  561.       * Contains GDBM support.
  562.  
  563.     A 386/486 with at least 4MB RAM is required, and a third-party memory
  564.     manager such as QEMM is strongly recommended.
  565.  
  566.     BIGPERL4 also passes those perl tests that do not depend on Unix-isms.
  567.     Full sources are included (including GDBM 1.5).  Freeware and copylefted
  568.     (in the case of GDBM 1.5).
  569.  
  570.     For a version that works on NT, FTP to rhino.microsoft.com
  571.     (131.107.1.121) the port of Perl there purportedly works well and
  572.     includes support for sockets from perl. The source builds out of the
  573.     box and contains some NT specific tests.
  574.  
  575.  
  576. 1.12) How do I get Perl to compile on Solaris?
  577.  
  578.     John Lees <lees@pixel.cps.msu.edu> reports:
  579.  
  580.     I have built perl on Solaris 2.1, 2.2 beta, and 2.2 FCS. Take /usr/ucb
  581.     out of your path and do not use any BSD/UCB libraries.  Only -lsocket,
  582.     -lnsl, and -lm are needed. You can use the hint for Solaris 2.0, but
  583.     the one for 2.1 is wrong. Do not use vfork. Do not use
  584.     -I/usr/ucbinclude.  The result works fine for me, but of couse does
  585.     not support a couple of BSDism's.
  586.  
  587.     Casper H.S. Dik <casper@fwi.uva.nl> reports
  588.  
  589.     You must remove all the references to /usr/ucblib AND
  590.     /usr/ucbinclude.  And ignore the Solaris_2.1 hints. They are wrong.
  591.     The undefining of vfork() probably ahs to do with the confusion it
  592.     gives to the compilers.  If you use cc, you mustn't compile
  593.     util.c/tutil.c  with -O.  I only used the following libs: -lsocket
  594.     -lnsl -lm (there is a problem with -lmalloc)
  595.  
  596.     Michael D'Errico <mike@software.com> reports:
  597.  
  598.     If you are using Solaris 2.x, the signal handling is broken.  If you set
  599.     up a signal handler such as 'ripper' it will be forgotten after the first
  600.     time the signal is caught.  To fix this, you need to recompile Perl.  Just
  601.     add '#define signal(x,y) sigset((x),(y))' after the '#include <signal.h>'
  602.     directive in each file that it occurs, then make it again.
  603.  
  604.  
  605. 1.13) How do I get Perl to compile on a Next?
  606.  
  607.     Bill Eldridge <bill@cognet.ucla.edu> reports:
  608.  
  609.     To get perl to compile on Nexts, you need to combine the
  610.     ansi and bsd headers:
  611.  
  612.         cd /usr/include
  613.         mkdir ansibsd
  614.         cd ansibsd
  615.         ln -s ../ansi
  616.         ln -s ../bsd
  617.  
  618.     Then follow the configuration instructions for Nexts, *replacing*
  619.     all mention of -I/usr/include/ansi or -I/usr/include/bsd with
  620.     -I/usr/include/ansibsd.  
  621.  
  622.     (There might be more elegant solutions, but this is how I
  623.     did it, and it's quick and so far painless).
  624.  
  625.  
  626.  
  627. 1.14) Where can I get (info|inter|ora|sql|syb)perl?
  628.  
  629.     Numerous database-oriented extensions to Perl have been written.
  630.     These amount to using the usub mechanism (see the usub/ subdirectory
  631.     in the distribution tree) to link in a database library, allowing
  632.     embedded calls to Informix, Interbase, Oracle, Ingres, and Sybase.
  633.     There is currently a project underway, organized by Buzz Moschetti
  634.     <buzz@toxicavenger.bear.com>, to create a higher level interface
  635.     (DBperl) that will allow you to write your queries in a
  636.     database-independent fashion.  If you're interested, send 
  637.     mail to <perldb-interest-request@vix.com> and ask to be placed on the
  638.     perldb-interest@vix.com mailing list.
  639.    
  640.     Meanwhile, here are the authors of the various extensions:
  641.  
  642.     What            Target DB       Who
  643.     --------        -----------     ----------------------------------------
  644.     Infoperl        Informix        Kurt Andersen (kurt@hpsdid.sdd.hp.com)
  645.     Interperl       Interbase       Buzz Moschetti (buzz@bear.com)
  646.     Oraperl         Oracle          Kevin Stock (kstock@encore.com)
  647.     Sqlperl         Ingres          Ted Lemon (mellon@ncd.com)
  648.     Sybperl         Sybase          Michael Peppler (mpeppler@itf.ch)
  649.  
  650.     Here's a bit of advertising from Buzz:
  651.  
  652.     Perl is an interpreted language with powerful string, scalar, and array
  653.     processing features developed by Larry Wall that "nicely bridges the
  654.     functionality gap between sh(1) and C."  Since relational DB operations
  655.     are typically textually oriented, perl is particularly well-suited to
  656.     manage the data flows.  The C source code, which is available free of
  657.     charge and runs on many platforms, contains a user-defined function entry
  658.     point that permits a developer to extend the basic function set of the
  659.     language.  The DBperl Group seeks to exploit this capability by creating a
  660.     standardized set of perl function extensions (e.g. db_fetch(), db_attach())
  661.     based the SQL model for manipulating a relational DB, thus providing a
  662.     portable perl interface to a variety of popular RDMS engines including
  663.     Sybase, Oracle, Ingres, Informix, and Interbase.  In theory, any DB engine
  664.     that implements a dynamic SQL interpreter in its HLI can be bolted onto
  665.     the perl front end with predicatable results, although at this time
  666.     backends exist only for the aforementioned five DB engines.
  667.  
  668.     A copy of the latest sybperl (patch level 6) can be found in the DBperl
  669.     archives on ftp.demon.co.uk:/pub/perl/db/sybperl
  670.  
  671.     This archive also contains ports for Ingres, Oracle, Sybase, Informix,
  672.     Unify, Postgres, and Interbase, as well as rdb and shql; it's the home
  673.     of the evolving DBperl API Specification.
  674.  
  675.  
  676. 1.15) Where can I get an SNMP-aware Perl?
  677.  
  678.     snmperl was written by Guy Streeter (streeter@ingr.com), and was
  679.     posted in late February 1993 to comp.protocols.snmp.  The author has
  680.     not made it available for anonymous ftp, archie only reported one site:
  681.  
  682.     Host liasun3.epfl.ch
  683.  
  684.     Location: /pub/net/snmp
  685.            FILE -rw-rw-r--       3407  Aug 11 1992  snmperl.README
  686.            FILE -rw-r--r--      17678  Aug 11 1992  snmperl.tar.Z
  687.  
  688.     Here is the gist of the README:
  689.  
  690.     README  $Revision: 1.1 $
  691.  
  692.     This directory contains the source code to add callable C subroutines
  693.     to perl.  The subroutines implement the SNMP functions "get",
  694.     "getnext", and "set".  They use the freely-distributable SNMP package
  695.     (version 1.1b) from CMU.
  696.  
  697.     USE:
  698.       There are four subroutines defined in the callable interface:
  699.     snmp_get, snmp_next, snmp_set, and snmp_error.
  700.  
  701.       snmp_get and snmp_next implement the GET and GETNEXT operations,
  702.     respectively.  The first two calling arguments are the hostname and
  703.     Community string.  The IP address of the host, as a dotted-quad ASCII
  704.     string, may be used as the hostname.  The rest of the calling
  705.     arguments are a list of variables.  See the CMU package documentation
  706.     for how variables may be specified.
  707.       snmp_set also takes hostname and Community string as arguments.  The
  708.     remaining arguments are a list of triples consisting of variable name,
  709.     variable type, and value.  The variable type is a string, such as
  710.     "INTEGER" or "IpAddress".
  711.       snmp_get, snmp_next, and snmp_set return a list containing
  712.     alternating variables and values.  snmp_get and snmp_next will simply
  713.     omit non-existent variables on return.  snmp_set will fail completely
  714.     if one of the specified variables does not exist (or is read-only).
  715.       snmp_error will return a text string containing some error
  716.     information about the most recent snmp_get|next|set call, if it had an
  717.     error.
  718.  
  719.     OTHER NOTES:
  720.       I didn't find all the places where the CMU library writes to stderr
  721.     or calls exit() directly.
  722.       The changes I made to mib.c involve the formatting of variable values
  723.     for return to the caller.  I took out the descriptive prefix so the
  724.     string contains only the value.
  725.       Enumerated types are returned as a string containing the symbolic
  726.     representation followed in parentheses by the numeric.
  727.  
  728.     DISTRIBUTION and OWNERSHIP
  729.       perl and the CMU SNMP package have their own statements.  Read them.
  730.     The work I've done is free and clear.  Just don't say you wrote it if
  731.     you didn't, and don't say I wrote it if you change it.
  732.  
  733.     Guy Streeter
  734.     streeter@ingr.com
  735.     April 1, 1992 (not a joke!)
  736.  
  737.  
  738. 1.16) There's an a2p and an s2p; why isn't there a p2c (perl-to-C)?
  739.  
  740.     Because the Pascal people would be upset that we stole their name. :-)
  741.  
  742.     The dynamic nature of Perl's do and eval operators (and remember that
  743.     constructs like s/$mac_donald/$mac_gregor/eieio count as an eval) would
  744.     make this very difficult.  To fully support them, you would have to put
  745.     the whole Perl interpreter into each compiled version for those scripts
  746.     using them.  This is what undump does right now, if your machine has it.
  747.     If what you're doing will be faster in C than in Perl, maybe it should
  748.     have been written in C in the first place.  For things that ought to be
  749.     written in Perl, the interpreter will be just about as fast, because the
  750.     pattern matching routines won't work any faster linked into a C program.
  751.     Even in the case of simple Perl programs that don't do any fancy evals, the
  752.     major gain would be in compiling the control flow tests, with the rest
  753.     still being a maze of twisty, turny subroutine calls.  Since these are not
  754.     usually the major bottleneck in the program, there's not as much to be
  755.     gained via compilation as one might think.
  756.  
  757.  
  758. 1.17) Where can I get undump for my machine?
  759.  
  760.     The undump program comes from the TeX distribution.  If you have TeX, then
  761.     you may have a working undump.  If you don't, and you can't get one,
  762.     *AND* you have a GNU emacs working on your machine that can clone itself,
  763.     then you might try taking its unexec() function and compiling Perl with
  764.     -DUNEXEC, which will make Perl call unexec() instead of abort().  You'll
  765.     have to add unexec.o to the objects line in the Makefile.  If you succeed,
  766.     post to comp.lang.perl about your experience so others can benefit from it.
  767.  
  768.     If you have a version of undump that works with Perl, please submit
  769.     its anon-FTP whereabouts to the FAQ maintainer.
  770.  
  771.  
  772. 1.18) Where can I get a perl-mode for emacs?
  773.  
  774.     In the perl4.0 source directory, you'll find a directory called
  775.     "emacs", which contains several files that should help you.
  776.  
  777.  
  778. 1.19) How can I use Perl interactively?
  779.     
  780.     The easiest way to do this is to run Perl under its debugger.
  781.     If you have no program to debug, you can invoke the debugger
  782.     on an `empty' program like this:
  783.  
  784.         perl -de 0
  785.  
  786.     (The more positive amongst us prefer "perl -de 1". :-)
  787.  
  788.     Now you can type in any legal Perl code, and it will be immediately
  789.     evaluated.  You can also examine the symbol table, get stack
  790.     backtraces, check variable Values, and if you want to, set 
  791.     breakpoints and do the other things you can do in a symbolic debugger.
  792.  
  793.  
  794. 1.20) Is there a Perl shell? 
  795.     
  796.    Not really.  Perl is a programming language, not a command
  797.    interpreter.  There is a very simple one called "perlsh"
  798.    included in the Perl source distribution.  It just does this:
  799.  
  800.     $/ = '';        # set paragraph mode
  801.     $SHlinesep = "\n";
  802.     while ($SHcmd = <>) {
  803.         $/ = $SHlinesep;
  804.         eval $SHcmd; print $@ || "\n";
  805.         $SHlinesep = $/; $/ = '';
  806.     }
  807.  
  808.    Not very interesting, eh?  
  809.  
  810.    Daniel Smith <dansmith@autodesk.com> is working on an interactive Perl
  811.    shell called SoftList.  It's currently at version 3.0beta.  SoftList
  812.    3.0 has tcsh-like command line editing, can let you define a file of
  813.    aliases so that you can run chunks of perl or UNIX commands, and so
  814.    on.  You can send mail to him for further information and availability.
  815. -- 
  816.     Tom Christiansen      tchrist@cs.colorado.edu       
  817.             Consultant
  818.     Boulder Colorado  303-444-3212
  819.  
  820.